<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
    <style>
        a{
            margin: 0 auto;
        }
        #arr2{
            display:block;
            text-align: center;
            width: 300px;
            height: 40px;
            line-height:40px;
            background: orange;
            color: white;
            border-radius: 2px;
            box-shadow: 0 5px 0 0 lightgrey;
        }
        .disable {
            background: #d6d6d6 !important;
            color: #999 !important;
        }
    </style>
</head>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>生日红包</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Index/activity')}" class="iconfont back"></a>
    </header>

    <div data-v-3cbfc35c="" class="activityMian main" s="[object Object]">
        <div data-v-3cbfc35c="" class="activiTop"><img data-v-3cbfc35c="" alt="" width="100%" src="/style/images/sjshengri.png">
            <input type="hidden" value="{$id}" id="uid6">
            <div data-v-128082f2="" class="rewardStatus">
                <em data-v-128082f2="" class="e1">当前等级：
                    <i data-v-128082f2="">
                        <input type="text" id="arr6" value="<?php if($arr1['level']==''){echo '未登录';}else{echo 'VIP'.$arr1['level'];};?>"  style="border: hidden;color: orangered;width: 80px" readonly>
                    </i>
                </em>
                <em data-v-128082f2="" class="e2">生日日期：
                    <i data-v-128082f2="">
                        <input type="text" value=" <?php if($arr['level']==''){echo '0000-00-00';}else{echo $birth;};?>"  style="border: hidden;color: orangered;width: 120px" readonly>
                    </i>
                </em>
                <input type="hidden" value="{$stimes111}" id="stimes111">
                <input type="hidden" value="{$etimes111}" id="etimes111">
                <input type="hidden" value="{$stime111}" id="stime111">
                <input type="hidden" value="{$etime111}" id="etime111">
                <em data-v-128082f2="" class="e3">生日红包奖金：
                    <i data-v-128082f2="">
                        <input type="text" value="<?php if($arr['level']==''){echo '0.00';}else{echo $hongbao;};?>" class="shengri" style="border: hidden;color: orangered;width: 80px" readonly>
                    </i>
                </em>
            </div>
            <div id="cen">
                <a data-v-5be8b080="" id="arr2" href="javascript:;" class="<?php if($arr['is_lingqu']!='0'){echo 'disable';} ?> dianji3">
                    领取
                </a>
            </div>
        </div>
        <h3 data-v-3cbfc35c="">奖金比例</h3>
        <table data-v-3cbfc35c="">
            <tbody><tr data-v-3cbfc35c="">
                <th data-v-3cbfc35c="">等级</th>
                <th data-v-3cbfc35c="">生日红包奖金</th>
            </tr>

            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP5</td>
                <td data-v-3cbfc35c="">38 元</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP6</td>
                <td data-v-3cbfc35c="">58 元</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP7</td>
                <td data-v-3cbfc35c="">88 元</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP8</td>
                <td data-v-3cbfc35c="">188 元</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP9</td>
                <td data-v-3cbfc35c="">888 元</td>
            </tr>
            </tbody></table>
        <h3 data-v-3cbfc35c="">活动说明</h3>

        <div data-v-3cbfc35c="" class="wrapExplain">  <p>
            1、会员完善个人信息后可在生日当天领取相应红包；
        </p>
            <p>
                2、仅限当天领取逾期无效；
            </p>
        </div>
    </div>
    <!--弹框 begian-->
    <div id="dengji" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">请登录
                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
    <!--弹框 begian-->
    <div id="shengri" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">
                        <p>1.生日红包已经领取</p>
                        <p>2.仅限当天领取，可能已经逾期</p>
                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
    <!--弹框 begian-->
    <div id="lingqu6" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">领取成功
                        <p>
                            金额为：<input type="text"  class="hhh" style="border: hidden;color: orangered;width: 60px" readonly>
                        </p>

                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div >
    <!--弹框 end-->
</div>
</body>
</html>
<script>
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
        window.location.href = "";
    })
    //生日红包未登录
    var arr6 = $("#arr6").val();
    if(arr6=='未登录'){
        $(".dianji3").addClass("disable");
    }
    //生日红包领取
    $(".dianji3").click(function () {
        var uid = $("#uid6").val();
        if(uid==''){
            $("#dengji").show();
            return false;
        }
        var shengri = $(".shengri").val();
        var type = 6;
        if($("#arr2").hasClass("disable")){
            $("#shengri").show();
            return false;
        }else {
            $.ajax({
                type: "POST",
                url: "{:U('Index/shengrihongbao')}",
                data: {'shengri': shengri, 'type': type},
                success: function (dat) {
                    if(dat==2){
                        $("#shengri").show();
                        $(".dianji1").addClass("disable");
                        return false;
                    }
                    var dat1 = dat;
                    var aaa = parseInt(dat1.substring(0, 1));
                    var bbb = parseInt(dat1.substr(1)) + '.00';
                    $(".hhh").val(bbb);
                    if (aaa == 1) {
                        $("#lingqu6").show();
                        $(".dianji3").addClass("disable");
                    }
                }
            });
        }
    });
</script>